<?php
namespace app\home\controller;
use think\Db;
use think\Controller;
class Reply{
    function index(){
        $m_id=input('m_id');
        $name=input('name');
        $email=input('email');
        $site=input('site');
        $content=input('content');
        $time=date("Y-m-d H:i:s");
        $data=[
            'name'=>$name,
            'email'=>$email,
            'site'=>$site,
            'content'=>$content,
            'time'=>$time,
            'm_id'=>$m_id
        ];
        if($data['name']==''|| $data['email']==''||$data['content']==''){
            return '请先完善信息';
        }
        Db::name('reply')->insert($data);
        return 'success';
    }
}